<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title>Welcome to CourseManager</title>
</head>
<body>

<%
if (request.getSession(false) != null && request.getSession(false).getAttribute("username") != null) {
	if (request.getSession(false).getAttribute("type").equals("admin")) {
		response.sendRedirect("admin_homepage.jsp");
	}
	else {
		response.sendRedirect("user_homepage.jsp");
	}
}
%>

<%@ include file="WEB-INF/private/body_wrapper_header.html" %>
	 <h2 align="right"><a href="about.jsp">About</a></h2>
	 <h1>Welcome to CourseManager </h1>
	 <h2>Please login in order to use the site.</h2>
		<form method="post" action="Login"><div>
			<p>Username:<input type="text" name="username" /></p>
			<p>Password: <input type="password" name="password" /></p>
			<input type="submit" value="Submit"></input>
		</div></form><br/>
		<h3><a href = "register.jsp">Not Registered?</a></h3>
		
<%@ include file="WEB-INF/private/body_wrapper_footer.html" %>

</body>
</html>